<section>
  <header class="major">
    <h2>{{ site.data['locales'][page['lang']]['sections']['translation_report'] }} - {{ page['translation_report']['percentage'] }}%</h2>
  </header>
  <table class="translation-report">
    <thead>
      <tr>
        {% assign headers = page['translation_report']['headers'] %}
        <th>{{ headers['section'] }}</th>
        <th>{{ headers['original_title'] }}</th>
        <th>{{ headers['translation_title'] }}</th>
        <th>{{ headers['original_version'] }}</th>
        <th>{{ headers['translation_version'] }}</th>
        <th>{{ headers['version_severity'] }}</th>
        <th>{{ headers['last_commit'] }}</th>
      </tr>
    </thead>
    <tbody>
      {% for section in page['translation_report']['sections'] %}
        {% assign title = section[0] %}
        {% for lesson in section[1] %}
        <tr>
          <td>{{ site.data['locales'][page['lang']]['sections'][title] }}</td>
          <td><a href="{{ lesson[1]['url'] }}" title="{{ lesson[1]['lesson'] }}">{{ lesson[1]['lesson'] }}</a></td>
          <td>
              {% unless lesson[1]['translated_severity'] == 'missing' %}
                <a href="{{ lesson[1]['translated_url'] }}" title="{{ lesson[1]['translated_title'] }}">{{ lesson[1]['translated_title'] }}</a>
              {% endunless %}
          </td>
          <td>{{ lesson[1]['original_version'] }}</td>
          <td>{{ lesson[1]['translated_version'] }}</td>
          <td class="version-cell" title="{{ lesson[1]['translated_severity'] }}">
            <div class="version-difference-indicator version-difference-{{ lesson[1]['version_severity'] }}"></div>
          </td>
          <td>
              {% if lesson[1]['last_commit'] == '' %}
              {% else %}
              <a class="icon" href="{{ lesson[1]['last_commit'] }}">
                  <i class="fa fa-github-square"></i>
                  <span class="label">{{ headers['last_commit'] }}</span>
              </a>
              {% endif %}
          </td>
        </tr>
        {% endfor %}
      {% endfor %}
    </tbody>
  </table>
</section>
